<?php
    /*
     Template Name: 友情链接展示
    */
?>
<?php get_header();?>
<!-- 页面布局开始 -->
		<div class="layui-content">
			<div class="layui-container">
				<div class="layui-row layui-col-space15 main">
					<div class="layui-col-md12 layui-col-lg12">
		<div class="layui-anim layui-anim-downbit">
					<div class="text-link">
						<!-- 标题这一块 -->
						<div class="title-article">
						            <div class="rp-title"><h1><?php the_title(); ?></h1></div>
<div class="author-row ">
        <div><?php the_time('Y年n月j日'); ?><span> · </span><?php post_views('',' 浏览'); ?></div>
            </div>
						        </div>
								<!-- 内容 -->
						<div class="">
						    	<div class="entry-content" itemprop="articleBody">
							    <?php the_content(); ?>
							</div>
							   <div class="linkbox">
							       <?php 
                                $bookmarks = get_bookmarks(array('orderby'=>'rand'));
                                if(!empty($bookmarks)){
                                    foreach($bookmarks as $bookmark){
                                        $friendimg = $bookmark->link_image;
                                        
                                      echo '
                                      <div class="link-url">
							           <a href="'.$bookmark->link_url.'" title="Hran" target="_blank" rel="noopener">
							           <img src="'.$friendimg.'"></a>
							       <div class="link-text"><p><a href="'.$bookmark->link_url.'" target="_blank" rel="noopener" title="Hran" class="block">'.$bookmark->link_name.'</a></p><p>'.$bookmark->link_description.'</p></div>
							           
							       </div>
                                      ';
                                    
                                    }
                                } ?>
							   </div>
						</div>
						<!-- 底部组件 -->
							<?php if(_read('rp-index-comments-switch') && comments_open()){ ?>
						<div class="content-components">
					<?php comments_template( $file, $separate_comments );?>
						</div>
						<?php }else{echo '<p class="plgb">评论已关闭</p>';} ?>
					</div>
		</div>
						
					</div>
				</div>
			</div>
			<!-- 底部 -->
		</div>
<!-- 页面布局结束 -->
<?php get_footer();?>